import { createRouter, createWebHashHistory } from 'vue-router';
import routes from './routes';
import Guard from './guard';

const router = createRouter({
  history: createWebHashHistory(),
  routes
  // scrollBehavior(to, from, savedPosition) {
  //   return {
  //     el: '#app',
  //     top: 0,
  //     behavior: 'smooth',
  //   }
  // },
});

// 路由守卫
Guard(router);

export default router;
